package com.guomao.mapper;

import com.guomao.entity.StudentA;
import org.apache.ibatis.annotations.MapKey;

import java.util.List;
import java.util.Map;

public interface StudentMapper {

    public StudentA queryStudentById(int id);

    public List<StudentA> queryAllStudents();

    //查询的单条结果可以放入到map集合中 key=列名 value=列值
    public Map<String, Object> queryStudentByIdToMap(int id);

    @MapKey("sid")
//    public Map<String,StudentA> queryStudentWithNameToMap(int id);
    public Map<Integer, StudentA> queryStudentWithNameToMap(int id);

    public StudentA queryStudentWithName(String name);
}
